<div class="form">

<?php $form = $this->beginWidget('CActiveForm', array(
	'id' => 'users-form',
	'enableAjaxValidation' => true,
)); ?>

	<p class="note">Поля, отмеченные <span class="required">*</span> обязательны к заполнению.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'fullname'); ?>
		<?php echo $form->textField($model,'fullname',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'fullname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>127)); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'username'); ?>
		<?php echo $form->textField($model,'username',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'username'); ?>
	</div>

	<?php if ($model->isNewRecord): ?>
	<div class="row">
		<?php echo $form->labelEx($model, 'password1'); ?>
		<?php echo $form->passwordField($model, 'password1', array('size' => 50,'maxlength' => 50)); ?>
		<?php echo $form->error($model,'password1'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'password2'); ?>
		<?php echo $form->passwordField($model, 'password2', array('size' => 50,'maxlength' => 50)); ?>
		<?php echo $form->error($model, 'password2'); ?>
	</div>
	<?php endif; ?>

	<div class="row">
		<?php echo $form->labelEx($model,'isadmin'); ?>
		<?php echo $form->checkBox($model,'isadmin'); ?>
		<?php echo $form->error($model,'isadmin'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<!--
<script>
	$(function() {
		$( "#datepicker" ).datepicker();
	});
	</script>



<div class="demo">

<p>Date: <input id="datepicker" type="text"></p>

</div>
-->